package tutorial

/**
 * 
 * zhu.tan@gmail.com
 * Date: Aug 22, 2010
 */

object Mixin {
  def main(args: Array[String]) {
    val c2 = new C2
    println(c2.m)
   }
}

class C1 {def m = List("C1")}

trait T1 extends C1 {override def m = {"T1" :: super.m}}
trait T2 extends C1 {override def m = {"T2" :: super.m}}
trait T3 extends C1 {override def m = {"T3" :: super.m}}

class C2 extends T1 with T2 with T3 {override def m = {"C2" :: super.m}}